<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript">
        //编写一个对象
        var user={
            name:"徐江涛",
            age:"18",
            sex:"男"
        };

        console.log(user);

        // 将js对象转化为json字符串

        var s = JSON.stringify(user);

        console.log(s);

        var parse = JSON.parse(s);
        console.log(parse);
    </script>
</head>
<body>

</body>
</html>